<?php
$tdatasales_orders=array();
	$tdatasales_orders[".NumberOfChars"]=80; 
	$tdatasales_orders[".ShortName"]="sales_orders";
	$tdatasales_orders[".OwnerID"]="";
	$tdatasales_orders[".OriginalTable"]="sales_orders";


	
//	field labels
$fieldLabelssales_orders = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelssales_orders["English"]=array();
	$fieldToolTipssales_orders["English"]=array();
	$fieldLabelssales_orders["English"]["id"] = "Id";
	$fieldToolTipssales_orders["English"]["id"] = "";
	$fieldLabelssales_orders["English"]["order_date"] = "Date";
	$fieldToolTipssales_orders["English"]["order_date"] = "";
	$fieldLabelssales_orders["English"]["order_no"] = "Order No";
	$fieldToolTipssales_orders["English"]["order_no"] = "";
	$fieldLabelssales_orders["English"]["account_id"] = "Account";
	$fieldToolTipssales_orders["English"]["account_id"] = "";
	$fieldLabelssales_orders["English"]["buyer_id"] = "Buyer";
	$fieldToolTipssales_orders["English"]["buyer_id"] = "";
	$fieldLabelssales_orders["English"][""] = "";
	$fieldToolTipssales_orders["English"][""] = "";
	$fieldLabelssales_orders["English"][""] = "";
	$fieldToolTipssales_orders["English"][""] = "";
	$fieldLabelssales_orders["English"]["currency_id"] = "Currency";
	$fieldToolTipssales_orders["English"]["currency_id"] = "";
	$fieldLabelssales_orders["English"]["shipment_mode_id"] = "Shipment Mode";
	$fieldToolTipssales_orders["English"]["shipment_mode_id"] = "";
	if (count($fieldToolTipssales_orders["English"])){
		$tdatasales_orders[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Hong Kong S.A.R.)")
{
	$fieldLabelssales_orders["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldToolTipssales_orders["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldLabelssales_orders["Chinese (Hong Kong S.A.R.)"]["id"] = "Id";
	$fieldToolTipssales_orders["Chinese (Hong Kong S.A.R.)"]["id"] = "";
	$fieldLabelssales_orders["Chinese (Hong Kong S.A.R.)"]["order_date"] = "Order Date";
	$fieldToolTipssales_orders["Chinese (Hong Kong S.A.R.)"]["order_date"] = "";
	$fieldLabelssales_orders["Chinese (Hong Kong S.A.R.)"]["order_no"] = "Order No";
	$fieldToolTipssales_orders["Chinese (Hong Kong S.A.R.)"]["order_no"] = "";
	$fieldLabelssales_orders["Chinese (Hong Kong S.A.R.)"]["account_id"] = "Account Id";
	$fieldToolTipssales_orders["Chinese (Hong Kong S.A.R.)"]["account_id"] = "";
	$fieldLabelssales_orders["Chinese (Hong Kong S.A.R.)"]["buyer_id"] = "Buyer Id";
	$fieldToolTipssales_orders["Chinese (Hong Kong S.A.R.)"]["buyer_id"] = "";
	$fieldLabelssales_orders["Chinese (Hong Kong S.A.R.)"][""] = "";
	$fieldToolTipssales_orders["Chinese (Hong Kong S.A.R.)"][""] = "";
	$fieldLabelssales_orders["Chinese (Hong Kong S.A.R.)"][""] = "";
	$fieldToolTipssales_orders["Chinese (Hong Kong S.A.R.)"][""] = "";
	$fieldLabelssales_orders["Chinese (Hong Kong S.A.R.)"]["currency_id"] = "Currency Id";
	$fieldToolTipssales_orders["Chinese (Hong Kong S.A.R.)"]["currency_id"] = "";
	$fieldLabelssales_orders["Chinese (Hong Kong S.A.R.)"]["shipment_mode_id"] = "Shipment Mode Id";
	$fieldToolTipssales_orders["Chinese (Hong Kong S.A.R.)"]["shipment_mode_id"] = "";
	if (count($fieldToolTipssales_orders["Chinese (Hong Kong S.A.R.)"])){
		$tdatasales_orders[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Taiwan)")
{
	$fieldLabelssales_orders["Chinese (Taiwan)"]=array();
	$fieldToolTipssales_orders["Chinese (Taiwan)"]=array();
	$fieldLabelssales_orders["Chinese (Taiwan)"]["id"] = "Id";
	$fieldToolTipssales_orders["Chinese (Taiwan)"]["id"] = "";
	$fieldLabelssales_orders["Chinese (Taiwan)"]["order_date"] = "Order Date";
	$fieldToolTipssales_orders["Chinese (Taiwan)"]["order_date"] = "";
	$fieldLabelssales_orders["Chinese (Taiwan)"]["order_no"] = "Order No";
	$fieldToolTipssales_orders["Chinese (Taiwan)"]["order_no"] = "";
	$fieldLabelssales_orders["Chinese (Taiwan)"]["account_id"] = "Account";
	$fieldToolTipssales_orders["Chinese (Taiwan)"]["account_id"] = "";
	$fieldLabelssales_orders["Chinese (Taiwan)"]["buyer_id"] = "Buyer";
	$fieldToolTipssales_orders["Chinese (Taiwan)"]["buyer_id"] = "";
	$fieldLabelssales_orders["Chinese (Taiwan)"][""] = "";
	$fieldToolTipssales_orders["Chinese (Taiwan)"][""] = "";
	$fieldLabelssales_orders["Chinese (Taiwan)"][""] = "";
	$fieldToolTipssales_orders["Chinese (Taiwan)"][""] = "";
	$fieldLabelssales_orders["Chinese (Taiwan)"]["currency_id"] = "Currency";
	$fieldToolTipssales_orders["Chinese (Taiwan)"]["currency_id"] = "";
	$fieldLabelssales_orders["Chinese (Taiwan)"]["shipment_mode_id"] = "Shipment Mode Id";
	$fieldToolTipssales_orders["Chinese (Taiwan)"]["shipment_mode_id"] = "";
	if (count($fieldToolTipssales_orders["Chinese (Taiwan)"])){
		$tdatasales_orders[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="French")
{
	$fieldLabelssales_orders["French"]=array();
	$fieldToolTipssales_orders["French"]=array();
	if (count($fieldToolTipssales_orders["French"])){
		$tdatasales_orders[".isUseToolTips"]=true;
	}
}


	
	$tdatasales_orders[".NCSearch"]=true;

	

$tdatasales_orders[".shortTableName"] = "sales_orders";
$tdatasales_orders[".nSecOptions"] = 0;
$tdatasales_orders[".recsPerRowList"] = 1;	
$tdatasales_orders[".tableGroupBy"] = "0";
$tdatasales_orders[".mainTableOwnerID"] = "";
$tdatasales_orders[".moveNext"] = 1;




$tdatasales_orders[".showAddInPopup"] = false;

$tdatasales_orders[".showEditInPopup"] = false;

$tdatasales_orders[".showViewInPopup"] = false;


$tdatasales_orders[".fieldsForRegister"] = array();

$tdatasales_orders[".listAjax"] = true;

	$tdatasales_orders[".audit"] = false;

	$tdatasales_orders[".locking"] = false;
	
$tdatasales_orders[".listIcons"] = true;
$tdatasales_orders[".edit"] = true;
$tdatasales_orders[".copy"] = true;
$tdatasales_orders[".view"] = true;

$tdatasales_orders[".exportTo"] = true;

$tdatasales_orders[".printFriendly"] = true;

$tdatasales_orders[".delete"] = true;

$tdatasales_orders[".showSimpleSearchOptions"] = true;

$tdatasales_orders[".showSearchPanel"] = true;


$tdatasales_orders[".isUseAjaxSuggest"] = true;

$tdatasales_orders[".rowHighlite"] = true;


// button handlers file names

$tdatasales_orders[".addPageEvents"] = false;

$tdatasales_orders[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatasales_orders[".isUseCalendarForSearch"] = true;

// use timepicker for search panel
$tdatasales_orders[".isUseTimeForSearch"] = false;

$tdatasales_orders[".isUseiBox"] = false;


$tdatasales_orders[".useDetailsPreview"] = true;	


$tdatasales_orders[".isUseInlineJs"] = $tdatasales_orders[".isUseInlineAdd"] || $tdatasales_orders[".isUseInlineEdit"];

$tdatasales_orders[".allSearchFields"] = array();

$tdatasales_orders[".globSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatasales_orders[".allSearchFields"]))
{
	$tdatasales_orders[".allSearchFields"][] = "id";	
}
$tdatasales_orders[".globSearchFields"][] = "order_date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("order_date", $tdatasales_orders[".allSearchFields"]))
{
	$tdatasales_orders[".allSearchFields"][] = "order_date";	
}
$tdatasales_orders[".globSearchFields"][] = "order_no";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("order_no", $tdatasales_orders[".allSearchFields"]))
{
	$tdatasales_orders[".allSearchFields"][] = "order_no";	
}
$tdatasales_orders[".globSearchFields"][] = "account_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("account_id", $tdatasales_orders[".allSearchFields"]))
{
	$tdatasales_orders[".allSearchFields"][] = "account_id";	
}
$tdatasales_orders[".globSearchFields"][] = "buyer_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("buyer_id", $tdatasales_orders[".allSearchFields"]))
{
	$tdatasales_orders[".allSearchFields"][] = "buyer_id";	
}
$tdatasales_orders[".globSearchFields"][] = "currency_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("currency_id", $tdatasales_orders[".allSearchFields"]))
{
	$tdatasales_orders[".allSearchFields"][] = "currency_id";	
}
$tdatasales_orders[".globSearchFields"][] = "shipment_mode_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("shipment_mode_id", $tdatasales_orders[".allSearchFields"]))
{
	$tdatasales_orders[".allSearchFields"][] = "shipment_mode_id";	
}


$tdatasales_orders[".googleLikeFields"][] = "id";
$tdatasales_orders[".googleLikeFields"][] = "order_date";
$tdatasales_orders[".googleLikeFields"][] = "order_no";
$tdatasales_orders[".googleLikeFields"][] = "account_id";
$tdatasales_orders[".googleLikeFields"][] = "buyer_id";
$tdatasales_orders[".googleLikeFields"][] = "currency_id";
$tdatasales_orders[".googleLikeFields"][] = "shipment_mode_id";



$tdatasales_orders[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatasales_orders[".allSearchFields"])) 
{
	$tdatasales_orders[".allSearchFields"][] = "id";	
}
$tdatasales_orders[".advSearchFields"][] = "order_date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("order_date", $tdatasales_orders[".allSearchFields"])) 
{
	$tdatasales_orders[".allSearchFields"][] = "order_date";	
}
$tdatasales_orders[".advSearchFields"][] = "order_no";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("order_no", $tdatasales_orders[".allSearchFields"])) 
{
	$tdatasales_orders[".allSearchFields"][] = "order_no";	
}
$tdatasales_orders[".advSearchFields"][] = "account_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("account_id", $tdatasales_orders[".allSearchFields"])) 
{
	$tdatasales_orders[".allSearchFields"][] = "account_id";	
}
$tdatasales_orders[".advSearchFields"][] = "buyer_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("buyer_id", $tdatasales_orders[".allSearchFields"])) 
{
	$tdatasales_orders[".allSearchFields"][] = "buyer_id";	
}
$tdatasales_orders[".advSearchFields"][] = "currency_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("currency_id", $tdatasales_orders[".allSearchFields"])) 
{
	$tdatasales_orders[".allSearchFields"][] = "currency_id";	
}
$tdatasales_orders[".advSearchFields"][] = "shipment_mode_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("shipment_mode_id", $tdatasales_orders[".allSearchFields"])) 
{
	$tdatasales_orders[".allSearchFields"][] = "shipment_mode_id";	
}

$tdatasales_orders[".isTableType"] = "list";


	

$tdatasales_orders[".isDisplayLoading"] = true;

$tdatasales_orders[".isResizeColumns"] = false;

	$tdatasales_orders[".subQueriesSupAccess"] = true;




$tdatasales_orders[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatasales_orders[".strOrderBy"] = $gstrOrderBy;
	
$tdatasales_orders[".orderindexes"] = array();

$tdatasales_orders[".sqlHead"] = "SELECT id,   order_date,   order_no,   account_id,   buyer_id,   currency_id,   shipment_mode_id";
$tdatasales_orders[".sqlFrom"] = "FROM sales_orders";
$tdatasales_orders[".sqlWhereExpr"] = "";
$tdatasales_orders[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatasales_orders[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatasales_orders[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatasales_orders[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "sales_orders";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_orders["id"]=$fdata;
//	order_date
	$fdata = array();
	$fdata["strName"] = "order_date";
	$fdata["ownerTable"] = "sales_orders";
		$fdata["Label"]="Date"; 
	
		
		
	$fdata["FieldType"]= 7;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Date";
	$fdata["ViewFormat"]= "Short Date";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "order_date";
	
		$fdata["FullName"]= "order_date";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 2;
		$fdata["DateEditType"] = 13; 
	$fdata["InitialYearFactor"] = 100; 
	$fdata["LastYearFactor"] = 10; 
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		
		$fdata["bEditPage"]=true; 
	
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_orders["order_date"]=$fdata;
//	order_no
	$fdata = array();
	$fdata["strName"] = "order_no";
	$fdata["ownerTable"] = "sales_orders";
		$fdata["Label"]="Order No"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "order_no";
	
		$fdata["FullName"]= "order_no";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=255";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		
		$fdata["bEditPage"]=true; 
	
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_orders["order_no"]=$fdata;
//	account_id
	$fdata = array();
	$fdata["strName"] = "account_id";
	$fdata["ownerTable"] = "sales_orders";
		$fdata["Label"]="Account"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="company_name";
				$fdata["LookupTable"]="company_addresses";
	$fdata["LookupOrderBy"]="company_name";
							$fdata["LookupWhere"] = "category='Account'";
										$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "account_id";
	
		$fdata["FullName"]= "account_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 4;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		
		$fdata["bEditPage"]=true; 
	
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_orders["account_id"]=$fdata;
//	buyer_id
	$fdata = array();
	$fdata["strName"] = "buyer_id";
	$fdata["ownerTable"] = "sales_orders";
		$fdata["Label"]="Buyer"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="company_name";
				$fdata["LookupTable"]="company_addresses";
	$fdata["LookupOrderBy"]="company_name";
							$fdata["LookupWhere"] = "category = 'Buyer'";
										$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "buyer_id";
	
		$fdata["FullName"]= "buyer_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 5;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		
		$fdata["bEditPage"]=true; 
	
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_orders["buyer_id"]=$fdata;
//	currency_id
	$fdata = array();
	$fdata["strName"] = "currency_id";
	$fdata["ownerTable"] = "sales_orders";
		$fdata["Label"]="Currency"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="currency_name";
				$fdata["LookupTable"]="currencies";
	$fdata["LookupOrderBy"]="currency_name";
																$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "currency_id";
	
		$fdata["FullName"]= "currency_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 6;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		
		$fdata["bEditPage"]=true; 
	
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_orders["currency_id"]=$fdata;
//	shipment_mode_id
	$fdata = array();
	$fdata["strName"] = "shipment_mode_id";
	$fdata["ownerTable"] = "sales_orders";
		$fdata["Label"]="Shipment Mode"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="name";
				$fdata["LookupTable"]="shipment_modes";
	$fdata["LookupOrderBy"]="name";
																$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "shipment_mode_id";
	
		$fdata["FullName"]= "shipment_mode_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 7;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		
		$fdata["bEditPage"]=true; 
	
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_orders["shipment_mode_id"]=$fdata;

	
$tables_data["sales_orders"]=&$tdatasales_orders;
$field_labels["sales_orders"] = &$fieldLabelssales_orders;
$fieldToolTips["sales_orders"] = &$fieldToolTipssales_orders;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["sales_orders"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="sales_order_items";
	$detailsTablesData["sales_orders"][$dIndex] = array(
		  "dDataSourceTable"=>"sales_order_items"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"sales_order_items"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "1"
		, "hideChild"=>"1"
		, "sqlHead"=>"SELECT id,   sales_order_id,   item_no,   product_id,   property_id,   size_system_id,   unit_price,   total_quantity,   size_breakup_id,   delivery_date,   status"	
		, "sqlFrom"=>"FROM sales_order_items"	
		, "sqlWhere"=>""
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 1
		, "previewOnAdd" => 1
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$detailsTablesData["sales_orders"][$dIndex]["masterKeys"][]="id";
		$detailsTablesData["sales_orders"][$dIndex]["detailKeys"][]="sales_order_id";


	
// tables which are master tables for current table (detail)
$masterTablesData["sales_orders"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,   order_date,   order_no,   account_id,   buyer_id,   currency_id,   shipment_mode_id";
$proto0["m_strFrom"] = "FROM sales_orders";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
$proto0["m_strTail"] = "";
$proto1=array();
$proto1["m_sql"] = "";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto1["m_column"]=$obj;
$proto1["m_contained"] = array();
$proto1["m_strCase"] = "";
$proto1["m_havingmode"] = "0";
$proto1["m_inBrackets"] = "0";
$proto1["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto1);

$proto0["m_where"] = $obj;
$proto3=array();
$proto3["m_sql"] = "";
$proto3["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto3["m_column"]=$obj;
$proto3["m_contained"] = array();
$proto3["m_strCase"] = "";
$proto3["m_havingmode"] = "0";
$proto3["m_inBrackets"] = "0";
$proto3["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto3);

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto5=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "sales_orders"
));

$proto5["m_expr"]=$obj;
$proto5["m_alias"] = "";
$obj = new SQLFieldListItem($proto5);

$proto0["m_fieldlist"][]=$obj;
						$proto7=array();
			$obj = new SQLField(array(
	"m_strName" => "order_date",
	"m_strTable" => "sales_orders"
));

$proto7["m_expr"]=$obj;
$proto7["m_alias"] = "";
$obj = new SQLFieldListItem($proto7);

$proto0["m_fieldlist"][]=$obj;
						$proto9=array();
			$obj = new SQLField(array(
	"m_strName" => "order_no",
	"m_strTable" => "sales_orders"
));

$proto9["m_expr"]=$obj;
$proto9["m_alias"] = "";
$obj = new SQLFieldListItem($proto9);

$proto0["m_fieldlist"][]=$obj;
						$proto11=array();
			$obj = new SQLField(array(
	"m_strName" => "account_id",
	"m_strTable" => "sales_orders"
));

$proto11["m_expr"]=$obj;
$proto11["m_alias"] = "";
$obj = new SQLFieldListItem($proto11);

$proto0["m_fieldlist"][]=$obj;
						$proto13=array();
			$obj = new SQLField(array(
	"m_strName" => "buyer_id",
	"m_strTable" => "sales_orders"
));

$proto13["m_expr"]=$obj;
$proto13["m_alias"] = "";
$obj = new SQLFieldListItem($proto13);

$proto0["m_fieldlist"][]=$obj;
						$proto15=array();
			$obj = new SQLField(array(
	"m_strName" => "currency_id",
	"m_strTable" => "sales_orders"
));

$proto15["m_expr"]=$obj;
$proto15["m_alias"] = "";
$obj = new SQLFieldListItem($proto15);

$proto0["m_fieldlist"][]=$obj;
						$proto17=array();
			$obj = new SQLField(array(
	"m_strName" => "shipment_mode_id",
	"m_strTable" => "sales_orders"
));

$proto17["m_expr"]=$obj;
$proto17["m_alias"] = "";
$obj = new SQLFieldListItem($proto17);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto19=array();
$proto19["m_link"] = "SQLL_MAIN";
			$proto20=array();
$proto20["m_strName"] = "sales_orders";
$proto20["m_columns"] = array();
$proto20["m_columns"][] = "id";
$proto20["m_columns"][] = "order_date";
$proto20["m_columns"][] = "order_no";
$proto20["m_columns"][] = "account_id";
$proto20["m_columns"][] = "buyer_id";
$proto20["m_columns"][] = "currency_id";
$proto20["m_columns"][] = "shipment_mode_id";
$obj = new SQLTable($proto20);

$proto19["m_table"] = $obj;
$proto19["m_alias"] = "";
$proto21=array();
$proto21["m_sql"] = "";
$proto21["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto21["m_column"]=$obj;
$proto21["m_contained"] = array();
$proto21["m_strCase"] = "";
$proto21["m_havingmode"] = "0";
$proto21["m_inBrackets"] = "0";
$proto21["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto21);

$proto19["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto19);

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
$obj = new SQLQuery($proto0);

$queryData_sales_orders = $obj;
$tdatasales_orders[".sqlquery"] = $queryData_sales_orders;

include(getabspath("include/sales_orders_events.php"));
$tableEvents["sales_orders"] = new eventclass_sales_orders;

?>
